<%inherit file="base.html"/>
<h2>
    ${_('Manage group members')}
</h2>
<div id="mainPanel">
    <div class="section" id="members">
        <h3>
            ${_('Members')} (${len(member_list['index'])})
            <span class="inlineNav">
                <a href="http://admin.hexlabel.net/invite_group/?iid=${hexlabel}" class="admin">${_('Invite...')}</a>
                <a href="http://${hexlabel}.hexlabel.net/group/">^ ${_('Back')}</a>
            </span>
        </h3>
        % if errors:
            <div class="alert">${message}</div>
        % elif message:
            <div class="message">${message}</div>
        % endif
        <p class="instruction">
        ${_('Select one or more members change settings.')}
        </p>
        % if len(member_list['index']) > 0:
            <form method="post" action="http://admin.hexlabel.net/manage_group/#members" class="listForm">
                <p>
                    <input type="hidden" name="iid" value="${iid}"/>
                </p>
                <ul>
                    % for miid in member_list['index']:
                        <li>
                            <input type="checkbox" class="checkbox" name="miid" value="${miid}"/>
                            <a href="http://${miid}.hexlabel.net/">
                                <img src="${member_list['items'][miid]['picture']}" alt="${member_list['items'][miid]['name']}" class="thumbnail"/>
                            
                            </a>
                            <a href="http://${miid}.hexlabel.net/">${member_list['items'][miid]['name']}</a>
                            <div class="roles">
                                % if 'admin' in member_list['items'][miid]['roles']:
                                    <div class="role"><span class="admin">${_('Admin')}</span></div>
                                % elif 'author' in member_list['items'][miid]['roles']:
                                    <div class="role"><span class="author">${_('Author')}</span></div>
                                % endif
                                % if member_list['items'][miid]['is_self']:
                                    <div class="role"><span class="self">${_('You')}</span></div>
                                % endif
                                % if member_list['items'][miid]['is_friend']:
                                    <div class="role"><span class="friend">${_('Friend')}</span></div>
                                % endif
                            </div>
                        </li>
                    % endfor
                </ul>
                <dl class="checkboxForm author">
                    <dd class="buttons">
                        <span>${_('Author role:')}</span>
                        <input type="submit" class="submit" name="grant_author" value="${_('Grant')}"/>
                        <input type="submit" class="submit warn" name="revoke_author" value="${_('Revoke')}"/>
                    </dd>
                </dl>
                <dl class="checkboxForm admin">
                    <dd class="buttons">
                        <span>${_('Admin role:')}</span>
                        <input type="submit" class="submit" name="grant_admin" value="${_('Grant')}"/>
                        <input type="submit" class="submit warn" name="revoke_admin" value="${_('Revoke')}"/>
                    </dd>
                </dl>
                <dl class="checkboxForm revoke">
                    <dd class="buttons">
                        <input type="submit" class="submit warn" name="revoke_membership" value="${_('Revoke membership')}"/>
                    </dd>
                </dl>
                <div class="clr"><br/></div>
            </form>
        % else:
            <ul>
                <li>${_('No members.')}</li>
            </ul>
        % endif
    </div>
</div>


<!-- defs -->
<%def name="title()">P2P Fusion - Peerscape | ${profile_fields['generic']['name']['values'][0]['value']} | ${_('Manage members')}</%def>
<%def name="body_class()">
    % if is_member:
  	    admin group member
    % else:
  	    admin group
    % endif
</%def>
<%def name="toplinks_style()">
</%def>

